package com.lx.service.impl;

import com.lx.dao.AdminDao;
import com.lx.dao.impl.AdminDaoImpl;
import com.lx.service.AdminService;
import com.lx.uitl.ConnUtil;

import java.sql.SQLException;

/**
 * @title: AdminServiceImpl
 * @projectName bankManage
 * @description: TODO
 * @author: yuanChu
 * @date: 2022/5/6  8:33
 */
public class AdminServiceImpl implements AdminService {
    AdminDao adminDao = new AdminDaoImpl();
    @Override
    public String loginAdmin(String name) {
        String pwd = null;
        try {
            pwd = adminDao.loginAdmin(name);
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }finally {
            ConnUtil.closeConnection();
        }
        return pwd;
    }
}
